<?php session_start();?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Alrinic Group - NBA tournament</title>
    <meta name="keywords" content="NBA website" />
    <meta name="description" content="NBA website with ranking" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    <link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" />
  </head>
  <body>
    <div id="templatemo_header_wrapper">

      <div id="templatemo_header">
	

    	<div id="site_title">
          <h1><a href="" target="_parent">
              <img src="images/alrinic_logo.png" alt="Web Templates" />
              <span>NBA ranking</span>
          </a></h1>
        </div>
        
        
        <div id="search_box">
          <form action="#" method="get">
            <input type="text" value="" name="q" size="10" id="searchfield" title="searchfield" onfocus="clearText(this)" onblur="clearText(this)" />
            <input type="submit" name="Search" value="Search" alt="Search" id="searchbutton" title="Search" />
          </form>
        </div>
        
        <div class="cleaner"></div>
      </div><!-- end of header -->

      <div id="templatemo_menu">
        <ul>
          <li><a href="index.php">Home</a></li>
          <li><a href="tournament.php">Tournament</a></li>
          <li><a href="players.php">Players</a></li>
          <li><a href="teams.php">Teams and clubs</a></li>
          <li><a href="contact.php">Contact Us</a></li>
        </ul>    	
      </div><!-- end of templatemo_menu -->

      <div id="templatemo_banner">
    
	<?php
	if(isset($_SESSION['myusername'])) {
	
   	echo '<h3>Modification webpage</h3>
		<p> You can here find different tool to add/modify or delete element of the database such as player, 
		trainer, team, club etc...</p>';

	}
	
	else {

   	echo '<h3>Error !</h3>
		<p> You are not logged in as web administrator. You can\'t modify database !</p>';
	$time = 3;
	$url = 'index.php';

	//On vérifie si aucun en-tête n'a déjà été envoyé    
	if (!headers_sent())
	{
		header("refresh: $time;url=$url"); 
		exit;
	}
	else
	{
		echo '<meta http-equiv="refresh" content="',$time,';url=',$url,'">';
	}		

	}
	
	?>
        
      </div>

    </div> <!-- end of header_wrapper -->

    <div id="templatemo_content_wrapper_outer">
      <div id="templatemo_content_wrapper_inner">
	<div id="templatemo_content_wrapper">

	  <div id="templatemo_content">
	  
	  <?php include('include/modification.php'); ?>
            
          <div id="templatemo_sidebar">

            <div id="news_section">
              
           
              <div class="cleaner"></div>  
              
            </div>
            
            <div class="section_rss_twitter">
              
           
              
            </div>
            
            <div class="cleaner"></div>
          </div> <!-- end of sidebar -->

	  <div class="cleaner"></div>
	</div>
      </div>
    </div>
    
    <div id="templatemo_footer_wrapper">
      <div id="templatemo_footer">

	     <ul class="footer_menu">
            <li><a href="index.php">Home</a></li>
            <li><a href="tournament.php">Tournament</a></li>
            <li><a href="players.php">Players</a></li>
            <li><a href="teams.php">Clubs and Teams</a></li>
            <li class="last_menu"><a href="contact.php">Contact</a></li>
        </ul>
	
        Copyright © 2012 <a href="#">AlRiNic Project</a> | 
        Designed by AlRiNic members | 
        AlRiNic group &amp; ENSEIRB-MATMECA
	
      </div> <!-- end of footer -->

    </div> <!-- end of footer_wrapper -->

  </body>
</html>
